<?php
namespace app\services\websocket;


use think\swoole\Websocket;
class Util
{
    public static function boardcast($message)
    {
        $ws = app(Websocket::class);

        // 加入默认房间
//        $ws->join('default_room');
        $fd = $ws->getSender();
        // 广播给所有客户端
        $ws->to($fd)->emit('messad1ge', $message);
    }


}